package net.zoneland.knowledge.enums;

/**
 * 纠错状态.
 *
 * @author: zmq
 * 2021/9/29
 */
public enum CorrectStatusEnum {
    /**
     * DRAFT.
     */
    DRAFT("DRAFT", "草稿"),

    /**
     * DEALING.
     */
    DEALING("DEALING", "处理中"),

    /**
     * FINISHED.
     */
    FINISHED("FINISHED", "处理完成");

    /**
     * 构造.
     * @param value 值
     * @param name 名称
     */
    CorrectStatusEnum(final String value, final String name) {
        this.value = value;
        this.name = name;
    }
    /**
     * key.
     */
    private String value;

    /**
     * label.
     */
    private String name;

    /**
     * .
     *
     * @return value
     */
    public String getValue() {
        return value;
    }

    /**
     * .
     *
     * @return name
     */
    public String getName() {
        return name;
    }

    public static CorrectStatusEnum getByValue(String value) {
        for (CorrectStatusEnum categoryEnum : CorrectStatusEnum.values()) {
            if (categoryEnum.value.equals(value)) {
                return categoryEnum;
            }
        }
        return null;
    }

}
